package org.ddd.book.domain.factoty;

import cn.hutool.extra.spring.SpringUtil;
import org.ddd.book.domain.IBaseEvent;
import org.ddd.book.domain.IEventPublisher;

/**
 * 领域事件
 */
public class EventFactory {

    public static void publishEvent(IBaseEvent event) {
        SpringUtil.getBean(IEventPublisher.class).publishEvent(event);
    }

}
